package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.domain.CommodityCatalog;
import cn.wolfcode.trip.base.service.ICommodityCatalogService;
import cn.wolfcode.trip.base.service.IDailyCommentService;
import cn.wolfcode.trip.base.service.IStrategyCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/*
* 接口:根据userId查询所有的评论
* */
@RestController
@RequestMapping("/commodityCatalogs")
public class CommodityCatalogController {
    @Autowired
    private ICommodityCatalogService catalogService;

    @GetMapping("{type}")
    public List<CommodityCatalog> queryByType(@PathVariable Integer type){
        return  catalogService.queryByType(type);
    }


}
